import { memo } from 'react'
import { Input } from 'antd'
import { SearchOutlined } from '@ant-design/icons'
import style from './index.module.less'

const Search = ({ onSearch }) => {
    return (
        <div className={style.box}>
            <Input.Search
                className={style.input}
                placeholder="搜索"
                enterButton={<SearchOutlined />}
                size="large"
                onSearch={onSearch}
                allowClear
            />
        </div>
    )
}

export const MemoSearch = memo(Search)